<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- <ul>
            <li v-for="item in arr" :key="item.id">{{item.name}}</li>
        </ul> -->
        <div v-if="judge">
            111
            <input type="text" key="1" />
        </div>
        <div v-else> 
            222
            <input type="text" key="2" />
        </div>
        <button @click="changeJudge">点击</button>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                arr:[{id:1,name:"张三"},{id:2,name:"李四"},{id:3,name:"王五"}],
                judge:true
            },
            methods:{
                changeJudge(){
                    this.judge = !this.judge;
                }
            }
        })

    </script>
</body>
</html>